package com.umeox.watch.moto.apiclient.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Rambo 2020/5/23
 * Describe:
 */
public class VoipTokenDTO implements Parcelable {


    /**
     * rtmFuid : 1
     * rtmTuid : 2
     * rtcUserId : 1
     * channel : 1_1111111111111
     * rtmToken : xxx
     * channelToken : xxx
     * expiredTime : 1588125666000
     */

    public String rtmFromMemberId;
    public String rtmToMemberId;
    public int rtcMemberId;
    public String channel;
    public String rtmToken;
    public String channelToken;
    public long expiredTime;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.rtmFromMemberId);
        dest.writeString(this.rtmToMemberId);
        dest.writeInt(this.rtcMemberId);
        dest.writeString(this.channel);
        dest.writeString(this.rtmToken);
        dest.writeString(this.channelToken);
        dest.writeLong(this.expiredTime);
    }

    public VoipTokenDTO() {
    }

    protected VoipTokenDTO(Parcel in) {
        this.rtmFromMemberId = in.readString();
        this.rtmToMemberId = in.readString();
        this.rtcMemberId = in.readInt();
        this.channel = in.readString();
        this.rtmToken = in.readString();
        this.channelToken = in.readString();
        this.expiredTime = in.readLong();
    }

    public static final Creator<VoipTokenDTO> CREATOR = new Creator<VoipTokenDTO>() {
        @Override
        public VoipTokenDTO createFromParcel(Parcel source) {
            return new VoipTokenDTO(source);
        }

        @Override
        public VoipTokenDTO[] newArray(int size) {
            return new VoipTokenDTO[size];
        }
    };

    @Override
    public String toString() {
        return "VoipTokenDTO{" +
                "rtmFromMemberId='" + rtmFromMemberId + '\'' +
                ", rtmToMemberId='" + rtmToMemberId + '\'' +
                ", rtcMemberId=" + rtcMemberId +
                ", channel='" + channel + '\'' +
                ", rtmToken='" + rtmToken + '\'' +
                ", channelToken='" + channelToken + '\'' +
                ", expiredTime=" + expiredTime +
                '}';
    }
}
